Fix Nullable configuration in Mocha examples#9571
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes nullable reference type configuration across the Mocha example projects by centralizing <Nullable> (and in one case <ImplicitUsings>) settings so the examples build consistently.
Changes:
- Move example-level
Nullable/ImplicitUsingsconfiguration intoDirectory.Build.propswhere appropriate. - Remove redundant per-project
Nullable/ImplicitUsingssettings from example.csprojfiles. - Minor simplification in the Demo billing handler using a null-conditional update.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Mocha/examples/PostgresTransport/PostgresTransport.ServiceDefaults/PostgresTransport.ServiceDefaults.csproj | Removes per-project nullable/implicit usings config so it’s inherited from the example’s props. |
| src/Mocha/examples/PostgresTransport/PostgresTransport.AppHost/PostgresTransport.AppHost.csproj | Removes per-project nullable config so it’s inherited from the example’s props. |
| src/Mocha/examples/PostgresTransport/Directory.Build.props | Enables Nullable and ImplicitUsings for the PostgresTransport example subtree. |
| src/Mocha/examples/ExceptionPolicies/ExceptionPolicies.csproj | Enables Nullable directly in the example project. |
| src/Mocha/examples/Demo/Directory.Build.props | Enables Nullable for the Demo example subtree. |
| src/Mocha/examples/Demo/Demo.ServiceDefaults/Demo.ServiceDefaults.csproj | Removes per-project nullable/implicit usings config so it’s inherited from the Demo props. |
| src/Mocha/examples/Demo/Demo.AppHost/Demo.AppHost.csproj | Removes per-project nullable config so it’s inherited from the Demo props. |
| src/Mocha/examples/Demo/Demo.Billing/Handlers/ProcessPartialRefundCommandHandler.cs | Replaces an explicit null-check block with a null-conditional assignment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9571 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the changes (Less than 80 chars)
Nullableconfiguration in Mocha examples.